<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="zhangcheng">
		<title>单位客户档案</title>
		<script type="text/javascript" src="../script/common.js" language="javascript" ></script> 
		<script type="text/javascript">
			//全局变量
			var qt = {};				//数据表格对象
			
			function load(){
				var tabform = $("tabform");
				var org = Common.cOrg()
				tabform.currentOrg.value = org.id;						
				tabform.currentOrgLevel.value = org.orgLevel;
				Eui.showNavigation();//显示导航栏
				setPages(["listview","detview"]);//切换页面
				Common.initDict(tabform.aarea,"province","全 部");
				Common.initDict(tabform.obank,"bank","全部");
				
				var columns = []
				columns[0] ={type:"checkbox"}
				columns[2] ={render:function (v,r){
					return "<a href=# onclick=showDetail('"+r[0]+"')>"+v+"</a>";
				}}
				
				qt = new QueryTable("client_org","tabform","datalist",columns);
			}
			
			//显示静态明细
			function showDetail(id){
				switchPage("detview");
				CardMgnt.customer.show("customerview",id,CardMgnt.COMPANYALL,{showAll:true,isCompany:true});
				CardMgnt.showViewForm(CardMgnt.customer.formName);
			}
		</script>
	</head>

	<body onload="load()">
		<div class="nav"><div id="nav">&nbsp;</div></div>
		<div id="listview">	
			<form id="tabform" name="tabform">
				<div class="searchForm">
					<input type="hidden" name="currentOrgLevel">
					<input type="hidden" name="currentOrg">
					<table cellSpacing="0" cellPadding="4" width="100%" border="0" class="label4">
						<tr>
							<td><label>单位名称</label> <input type="text" name="onames" maxlength="20"></td>
							<td><label>证 件 号</label> <input type="text" name="idno" onblur="checkV(this,'99')"></td>
							<td><label>开户银行</label> <select name="obank"><option></option></select>
							<button type="button" onclick="qt.showTable()">查 询</button></td>
						</tr>
					</table>
				</div>
			</form>
			<div id="datalist"></div>
		</div>
		
		<!--明细(新增/修改)页面部分-->
		<div id="detview" style="display:none;">
			<div id="customerview" class="form">
			</div>
			<p>
				<button onclick="switchPage('listview')">返 回</button>
			</p>
		</div>
	</body>
</html>